#include <iostream>

using namespace std;

union Data
{
    int a;
    char b;
};


int main()
{
    int a = 0x00000001;
    char* c = (char*)&a;

    cout << (c[0]==1) << endl;
    cout << (c[3]==1) << endl;

    Data d;
    d.a = 1;

    cout << (d.b==1) << endl;
    cout << (d.b==0) << endl;

    return 0;
}

